package com.tg.paw.ums.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.tg.paw.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 后台用户角色和权限关系表
 * </p>
 *
 * @author Rubble
 * @since 2020-10-27
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ums_role_permission_relation")
@ApiModel(value="RolePermissionRelation对象", description="后台用户角色和权限关系表")
public class RolePermissionRelation extends BaseEntity {


    @ApiModelProperty(value = "自增id")
    @TableId(value = "id", type = IdType.AUTO)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "角色id")
    @TableField("role_id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long roleId;

    @ApiModelProperty(value = "权限id")
    @TableField("permission_id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long permissionId;

    @ApiModelProperty(value = "半选状态: (0: 否; 1: 是)")
    @TableField("immediate")
    private Integer immediate;


}
